home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / lcppb.zip / LCPPANS.ZIP / FNCOUNT.CPP < prev    next >
C/C++ Source or Header  |  1991-07-08  |  458b  |  27 lines

  1. // fncount.cpp -- Count function calls
  2.  
  3. #include <iostream.h>
  4.  
  5. void test(void);
  6.  
  7. main()
  8. {
  9.   for (int i = 0; i < 10; i++)
  10.     test();
  11. }
  12.  
  13. void test(void)
  14. {
  15.   static int count = 0;
  16.   count++;
  17.   cout << "\nFunction call # " << count;
  18. }
  19.  
  20.  
  21. // Copyright (c) 1990 by Tom Swan. All rights reserved
  22. // Revision 1.00    Date: 12/08/1990   Time: 04:17 pm
  23.  
  24. // Revision 1.01    Date: 07/08/1991   Time: 05:41 pm
  25. // Converted for Borland C++ 2.0
  26.  
  27.